Release 10.1A: OpenEdge Data Management:
DataServer for ORACLE
ROWID function
The
ROWIDdata type provides a record identifier that is compatible across OpenEdge and ORACLE databases. Applications that use theROWIDfunction behave the same way whether they access Progress 4GL or ORACLE records.By default, the DataServer designates a column to support the
ROWIDfunction. It evaluates the indexes available for a table and selects one in the following order:ORACLE might not provide a native
ROWIDfor views that contain aggregates or perform joins. For one of these views to support theROWIDfunction, use the Data Dictionary to select aNUMBERcolumn, create a unique index based on it, and designate it as theROWID.The Data Dictionary allows you to select a different column to support the
ROWIDfunction or to select the nativeROWID. See the "Defining the ROWID" section in Chapter 7, "The Data Server Tutorial," for instructions on changing how a table supportsROWID.The native
ROWIDtypically provides the fastest access to a record. However, the nativeROWIDdoes not support the Progress 4GLFINDPREV/LASTstatement or cursor repositioning.FINDFIRST/NEXTstatements for tables that use the nativeROWIDas a row identifier have unpredictable results. Qualify theFINDFIRSTstatement with theUSE-INDEXoption, as in the following example, to get consistent results across various data sources, as shown:
ROWIDprovides the same functionality as theRECIDfunction, butROWIDis more consistent across data sources. Replace theRECIDfunction withROWIDin existing applications.Follow these guidelines when using
ROWIDin applications that you want to deploy across several databases:
- Do not try to get the
ROWIDvalue before the user assigns values to the unique keys of that record. Some DataServers use the unique key to generate aROWIDvalue.- Refresh the
ROWIDvalue if a value of a unique key might have changed.- Refresh the
ROWIDvalue after you undo aDELETE. TheROWIDvalue might be different after the record is re-created.ROWIDvalues are stable for a transaction. Do not rely on them being the same across transactions or sessions.See the
ROWIDfunction entry in OpenEdge Development: Progress 4GL Reference for more information and examples.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |